package org.bbl.db.mybatis.mapper;

import org.apache.ibatis.annotations.Select;
import org.bbl.db.domain.Language;

import java.util.List;

/**
 * @author biniamg
 * @since 1/2/13
 */
public interface LanguageMapper extends BaseMapper<Language> {
    @Select("SELECT * FROM LANGUAGE WHERE LANGUAGEID = #{languageId}")
    public Language findById(int languageId);

    @Select("SELECT * FROM LANGUAGE ORDER BY LANGUAGEID")
    public List<Language> findAll();

    @Select("SELECT * FROM LANGUAGE WHERE FAMILYID = #{groupId}")
    public List<Language> findByParentId(int groupId);
}
